import 'dart:math';

class Generate {
  static final _number = "0123456789";
  static final _alphabet =
      "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

  static String _get(String collection, int length) {
    String output = "";
    while (output.length < length) {
      int index = Random.secure().nextInt(collection.length);
      output += collection[index];
    }
    return output;
  }

  static String get id => _get(_alphabet, 21);
  static String get sms => _get(_number, 6);
}
